﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace BarManager.Core.Entity
{
    [DataContract]
    public class Categoria 
    {      
        [DataMember]
        public int Id { get; set; }

        [Required]
        [StringLength(50)]
        [Display(Name = "Nombre")]
        [DataMember]
        public string Nombre { get; set; }
              
        [Display(Name = "Elaboración Propia")]
        [DataMember]
        public bool ElaboracionPropia { get; set; }

        [DataMember]
        public virtual ICollection<Producto> ProductoList { get; set; }

        public Categoria()
        {
            this.ProductoList = new List<Producto>();
        }
    }
}
